X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=blobdiff_plain;f=tests%2Fselenium%2Fspecs%2Fpage.js;h=130d6afb3ab1709d7b00d7174302613d343a5482;hb=9c7d87634144b3214f62ebc387b7ff612af5be5a;hp=4ec94eb38f133750c74f6cef12dae851acb418e4;hpb=52c7dc56df97e7ee4b17090c51f8038fea64236a;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/selenium/specs/page.js b/tests/selenium/specs/page.js index 4ec94eb38f..130d6afb3a 100644 --- a/tests/selenium/specs/page.js +++ b/tests/selenium/specs/page.js @@ -1,6 +1,7 @@ 'use strict'; const assert = require( 'assert' ), DeletePage = require( '../pageobjects/delete.page' ), + RestorePage = require( '../pageobjects/restore.page' ), EditPage = require( '../pageobjects/edit.page' ), HistoryPage = require( '../pageobjects/history.page' ), UserLoginPage = require( '../pageobjects/userlogin.page' ); @@ -87,4 +88,27 @@ describe( 'Page', function () { } ); + it( 'should be restorable', function () { + + // login + UserLoginPage.loginAdmin(); + + // create + browser.call( function () { + return EditPage.apiEdit( name, content ); + } ); + + // delete + browser.call( function () { + return DeletePage.apiDelete( name, content + '-deletereason' ); + } ); + + // restore + RestorePage.restore( name, content + '-restorereason' ); + + // check + assert.equal( RestorePage.displayedContent.getText(), name + ' has been restored\nConsult the deletion log for a record of recent deletions and restorations.' ); + + } ); + } );